#include "Slot.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Slot_classType = NULL;
VTable* Slot_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Str toStr() */
Str* Slot_toStr(Obj self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.toStr not implemented yet"));
}


/* Slot? find(Str qname, Bool checked) */
Slot* Slot_find_1(Str* qname)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.find not implemented yet"));
}


/* Slot? find(Str qname, Bool checked) */
Slot* Slot_find(Str* qname, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.find not implemented yet"));
}


/* Method? findMethod(Str qname, Bool checked) */
Method* Slot_findMethod_1(Str* qname)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findMethod not implemented yet"));
}


/* Method? findMethod(Str qname, Bool checked) */
Method* Slot_findMethod(Str* qname, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findMethod not implemented yet"));
}


/* Field? findField(Str qname, Bool checked) */
Field* Slot_findField_1(Str* qname)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findField not implemented yet"));
}


/* Field? findField(Str qname, Bool checked) */
Field* Slot_findField(Str* qname, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findField not implemented yet"));
}


/* Func? findFunc(Str qname, Bool checked) */
Func* Slot_findFunc_1(Str* qname)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findFunc not implemented yet"));
}


/* Func? findFunc(Str qname, Bool checked) */
Func* Slot_findFunc(Str* qname, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.findFunc not implemented yet"));
}


/* Type parent() */
Type* Slot_parent(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.parent not implemented yet"));
}


/* Str name() */
Str* Slot_name(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.name not implemented yet"));
}


/* Str qname() */
Str* Slot_qname(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.qname not implemented yet"));
}


/* Bool isField() */
Bool Slot_isField(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isField not implemented yet"));
}


/* Bool isMethod() */
Bool Slot_isMethod(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isMethod not implemented yet"));
}


/* Bool isAbstract() */
Bool Slot_isAbstract(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isAbstract not implemented yet"));
}


/* Bool isConst() */
Bool Slot_isConst(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isConst not implemented yet"));
}


/* Bool isCtor() */
Bool Slot_isCtor(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isCtor not implemented yet"));
}


/* Bool isInternal() */
Bool Slot_isInternal(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isInternal not implemented yet"));
}


/* Bool isNative() */
Bool Slot_isNative(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isNative not implemented yet"));
}


/* Bool isOverride() */
Bool Slot_isOverride(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isOverride not implemented yet"));
}


/* Bool isPrivate() */
Bool Slot_isPrivate(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isPrivate not implemented yet"));
}


/* Bool isProtected() */
Bool Slot_isProtected(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isProtected not implemented yet"));
}


/* Bool isPublic() */
Bool Slot_isPublic(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isPublic not implemented yet"));
}


/* Bool isStatic() */
Bool Slot_isStatic(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isStatic not implemented yet"));
}


/* Bool isSynthetic() */
Bool Slot_isSynthetic(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isSynthetic not implemented yet"));
}


/* Bool isVirtual() */
Bool Slot_isVirtual(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.isVirtual not implemented yet"));
}


/* Facet[] facets() */
List* Slot_facets(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.facets not implemented yet"));
}


/* Facet? facet(Type type, Bool checked) */
Facet* Slot_facet_1(Slot* self, Type* type)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.facet not implemented yet"));
}


/* Facet? facet(Type type, Bool checked) */
Facet* Slot_facet(Slot* self, Type* type, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.facet not implemented yet"));
}


/* Bool hasFacet(Type type) */
Bool Slot_hasFacet(Slot* self, Type* type)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.hasFacet not implemented yet"));
}


/* Str? doc() */
Str* Slot_doc(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.doc not implemented yet"));
}


/* Str signature() */
Str* Slot_signature(Slot* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Slot.signature not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Slot_initType(void)
{
  if (Slot_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = Slot_initVTable();
    Type* type = Type_new("Slot", baseType, vtable, sizeof(Slot), sizeof(SlotVTable));
    Type_registerMethodImplementation(type, "doc", Slot_doc, 0);
    Type_registerMethodImplementation(type, "facet", Slot_facet_1, 1);
    Type_registerMethodImplementation(type, "facet", Slot_facet, 2);
    Type_registerMethodImplementation(type, "facets", Slot_facets, 0);
    Type_registerMethodImplementation(type, "find", Slot_find_1, 1);
    Type_registerMethodImplementation(type, "find", Slot_find, 2);
    Type_registerMethodImplementation(type, "findField", Slot_findField_1, 1);
    Type_registerMethodImplementation(type, "findField", Slot_findField, 2);
    Type_registerMethodImplementation(type, "findFunc", Slot_findFunc_1, 1);
    Type_registerMethodImplementation(type, "findFunc", Slot_findFunc, 2);
    Type_registerMethodImplementation(type, "findMethod", Slot_findMethod_1, 1);
    Type_registerMethodImplementation(type, "findMethod", Slot_findMethod, 2);
    Type_registerMethodImplementation(type, "hasFacet", Slot_hasFacet, 1);
    Type_registerMethodImplementation(type, "isAbstract", Slot_isAbstract, 0);
    Type_registerMethodImplementation(type, "isConst", Slot_isConst, 0);
    Type_registerMethodImplementation(type, "isCtor", Slot_isCtor, 0);
    Type_registerMethodImplementation(type, "isField", Slot_isField, 0);
    Type_registerMethodImplementation(type, "isInternal", Slot_isInternal, 0);
    Type_registerMethodImplementation(type, "isMethod", Slot_isMethod, 0);
    Type_registerMethodImplementation(type, "isNative", Slot_isNative, 0);
    Type_registerMethodImplementation(type, "isOverride", Slot_isOverride, 0);
    Type_registerMethodImplementation(type, "isPrivate", Slot_isPrivate, 0);
    Type_registerMethodImplementation(type, "isProtected", Slot_isProtected, 0);
    Type_registerMethodImplementation(type, "isPublic", Slot_isPublic, 0);
    Type_registerMethodImplementation(type, "isStatic", Slot_isStatic, 0);
    Type_registerMethodImplementation(type, "isSynthetic", Slot_isSynthetic, 0);
    Type_registerMethodImplementation(type, "isVirtual", Slot_isVirtual, 0);
    Type_registerMethodImplementation(type, "name", Slot_name, 0);
    Type_registerMethodImplementation(type, "parent", Slot_parent, 0);
    Type_registerMethodImplementation(type, "qname", Slot_qname, 0);
    Type_registerMethodImplementation(type, "signature", Slot_signature, 0);
    Type_registerMethodImplementation(type, "toStr", Slot_toStr, 0);
    Slot_classType = type;
    Slot_initStatic();
  }
  return Slot_classType;
}


VTable* Slot_initVTable(void)
{
  if (Slot_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(SlotVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    ((FanObjVTable*)vtable)->toStr = Slot_toStr;
    ((SlotVTable*)vtable)->signature = Slot_signature;
    Slot_classVTable = vtable;
  }
  return Slot_classVTable;
}


void Slot_initStatic(void)
{
}
